home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 351-375 / disk_351 / pdc / libsrc.lzh / Make / h.h < prev    next >
C/C++ Source or Header  |  1990-04-19  |  3KB  |  137 lines

  1. /*
  2.  *    Include header for make
  3.  */
  4.  
  5.  
  6. #ifndef uchar
  7. #ifdef os9
  8. #define uchar        char
  9. #define void        int
  10. #define fputc        putc
  11. #else
  12. #define uchar        unsigned char
  13. #endif
  14. #endif
  15.  
  16. #define bool        uchar
  17. #define time_t        long
  18.  
  19. #ifdef TRUE
  20. #undef TRUE
  21. #endif
  22. #ifdef FALSE
  23. #undef FALSE
  24. #endif
  25. #define TRUE        (1)
  26. #define FALSE        (0)
  27. #define max(a,b)    ((a)>(b)?(a):(b))
  28.  
  29. #define DEFN1        "makefile"    /* Default names  */
  30. #ifdef unix
  31. #define DEFN2        "Makefile"
  32. #endif
  33. #ifdef eon
  34. #define DEFN2        "Makefile"
  35. #endif
  36. /* os9 is case insensitive */
  37.  
  38. #ifdef AZTEC_C
  39. #define amiga
  40. #endif
  41.  
  42. #define LZ        (1024)    /* Line size  */
  43.  
  44.  
  45.  
  46. /*
  47.  *    A name.  This represents a file, either to be made, or existant
  48.  */
  49.  
  50. struct name {
  51.     struct name    *n_next;    /* Next in the list of names */
  52.     char           *n_name;    /* Called */
  53.     struct line    *n_line;    /* Dependencies */
  54.     time_t          n_time;    /* Modify time of this name */
  55.     uchar           n_flag;    /* Info about the name */
  56. };
  57.  
  58. #define N_MARK        0x01    /* For cycle check */
  59. #define N_DONE        0x02    /* Name looked at */
  60. #define N_TARG        0x04    /* Name is a target */
  61. #define N_PREC        0x08    /* Target is precious */
  62. #define N_DOUBLE    0x10    /* Double colon target */
  63.  
  64. /*
  65.  *    Definition of a target line.
  66.  */
  67. struct line {
  68.     struct line    *l_next;    /* Next line (for ::) */
  69.     struct depend  *l_dep;    /* Dependents for this line */
  70.     struct cmd     *l_cmd;    /* Commands for this line */
  71. };
  72.  
  73.  
  74. /*
  75.  *    List of dependents for a line
  76.  */
  77. struct depend {
  78.     struct depend  *d_next;    /* Next dependent */
  79.     struct name    *d_name;    /* Name of dependent */
  80. };
  81.  
  82.  
  83. /*
  84.  *    Commands for a line
  85.  */
  86. struct cmd {
  87.     struct cmd     *c_next;    /* Next command line */
  88.     char           *c_cmd;    /* Command line */
  89. };
  90.  
  91.  
  92. /*
  93.  *    Macro storage
  94.  */
  95. struct macro {
  96.     struct macro   *m_next;    /* Next variable */
  97.     char           *m_name;    /* Called ... */
  98.     char           *m_val;    /* Its value */
  99.     uchar           m_flag;    /* Infinite loop check */
  100. };
  101.  
  102. extern char    *myname;
  103. extern struct name namehead;
  104. extern struct macro *macrohead;
  105. extern struct name *firstname;
  106. extern bool     silent;
  107. extern bool     ignore;
  108. extern bool     rules;
  109. extern bool     dotouch;
  110. extern bool     quest;
  111. extern bool     domake;
  112. extern char     str1[];
  113. extern char     str2[];
  114. extern int      lineno;
  115.  
  116. char           *fgets();
  117. char           *index();
  118. char           *rindex();
  119. char           *malloc();
  120. extern int      errno;
  121.  
  122. char           *getmacro();
  123. struct macro   *setmacro();
  124. void            input();
  125. void            error();
  126. void            fatal();
  127. int             make();
  128. struct name    *newname();
  129. struct depend  *newdep();
  130. struct cmd     *newcmd();
  131. void            newline();
  132. char           *suffix();
  133. void            touch();
  134. void            makerules();
  135. char           *gettok();
  136. void            precious();
  137.